﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KnBinarySerializer.None
{
    internal class DBNullFormatter : IFormatter
    {
        public Type GetHandleType()
        {
            return typeof(DBNull);
        }

        public byte GetKey()
        {
            return 200;
        }

        public bool IsFixLen()
        {
            return true;
        }

        public object ReadBytes(BinarySerializeManager serial, int maxLen, Type type)
        {
            return DBNull.Value;
        }

        public int WriteBytes(BinarySerializeManager serial, object obj)
        {
            return 0;
        }
    }
}
